\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=5em,semithick]
    \tikzstyle{every state}=[text=black]
    \tikzset{nearnodes/.style={node distance=2em}}

    \node[state] (1) {1};
    \node[state] (3) [right of=1] {3};
    \node[state] (2) [below of=3] {2};
    \node[state] (4) [right of=3] {4};
    \node[state] (end) [right of=4] {};

    \node[nearnodes] (+1) [left of=1] {+};
    \node[nearnodes] (-end) [below right of=end] {-};

    \path (1) edge node {$a$} (3); 
    \path (1) edge node {$b$} (2);
    \path (3) edge node {$c$} (2);
    \path (3) edge node {$b$} (4);
    \path (2) edge node {$d$} (4);
    \path (4) edge node {\#} (end);
    
\end{tikzpicture}
